package com.example.worldgdpjar.dao;

import com.example.worldgdpjar.model.CountryLanguage;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CountryLanguageDao {
  public List<CountryLanguage> getLanguages(String countryCode, Integer offset, Integer pageSize);

  public int getLanguageCount(String countryCode, String language);

  @CacheEvict(value = "language", allEntries = true)
  public int addLanguage(String countryCode, CountryLanguage language);

  @CacheEvict(value = "language", allEntries = true)
  public int deleteLanguage(String countryCode, String language);
}
